为了检查猜测结果,我们将循环遍历 guess 列表和 code 列表两次,来比较颜色和位置。
- 使用 Define Function with Parameters ,并将下列变量作为参数包含: guess、code 和 y。
- 添加两个 Integer Variable , 其中一个名为 x ,值为 85。另一个名为 peg_num ,值为 0。
- 添加两个空列表。将其中一个命名为 colors_tried ,将另一个命名为 colors_matched。
To navigate the page using the TAB key, first press ESC to exit the code editor.